package main

import "fmt"

func main() {
	var n1 int = +10
	fmt.Println(n1)
	var n2 int = 3 + 4
	fmt.Println(n2)
	var n3 string = "abc" + "edf"
	fmt.Println(n3)
	fmt.Println(10 / 3)
	fmt.Println(10.0 / 3)
	fmt.Println(10 % 3)
	var a int = 10
	a++
	fmt.Println(a)

	var num1 int = (10+20)%3 + 3 - 7
	fmt.Println(num1)
	var num2 int = 10
	num2 +=20
	fmt.Println(num2)

	var age int = 18
	fmt.Println(&age)
	var ptr *int = &age
	fmt.Println(ptr)
	fmt.Println("ptr值为：",*ptr)

	fmt.Println("获取键盘录入")
	fmt.Println("请输入学生的年龄：")
	var stuAge int
	fmt.Scanln(&stuAge)
	var stuName string
	fmt.Println("请输入学生的姓名：")
	fmt.Scanln(&stuName)

	fmt.Printf("学生的年龄为 %v 姓名为 %v", stuAge, stuName)
}
